<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="../base.jsp" %>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>正达建筑设计院图纸管理系统</title>
</head>
<body>
<div id="frameContent" class="content-wrapper" style="margin-left:0px;">
    <section class="content-header">
        <h1>
            图纸管理
            <small>图纸类型管理</small>
        </h1>
        <ol class="breadcrumb">
            <li><a href="all-admin-index.html"><i class="fa fa-dashboard"></i> 首页</a></li>
        </ol>
    </section>
    <section class="content">
        <div class="box-body">
            <div class="nav-tabs-custom">
                <ul class="nav nav-tabs">
                    <li class="active">
                        <a href="#tab-form" data-toggle="tab">修改分类信息</a>
                    </li>
                </ul>
                <div class="tab-content">
                    <form id="editForm" action="${ctx}/type/edit" method="post">
                        <input type="hidden" name="id" value="${type.id}">
                        <div class="tab-pane active" id="tab-form">
                            <div class="row data-type">
                                <div class="col-md-2 title">类别名称</div>
                                <div class="col-md-10 data">
                                    <input type="text" class="form-control" placeholder="类别名称" name="type_name" value="${type.type_name}">
                                </div>
                                <div class="col-md-2 title">状态</div>
                                <div class="col-md-4 data">
                                    <div class="form-group form-inline">
                                        <div class="radio"><label><input type="radio" ${type.state==0?'checked':''} name="state" value="0">停用</label>
                                        </div>
                                        <div class="radio"><label><input type="radio" ${type.state==1?'checked':''} name="state" value="1">启用</label>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-2 title">创建时间</div>
                                <div class="col-md-4 data">
                                    <div class="input-group date">
                                        <div class="input-group-addon">
                                            <i class="fa fa-calendar"></i>
                                        </div>
                                        <input type="text" placeholder="创建时间" name="create_time" class="form-control pull-right"
                                               value="${requestScope.type.create_time}" id="datepicker">
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

            </div>
        </div>
        <div class="box-tools text-center">
            <button type="button" onclick='document.getElementById("editForm").submit()' class="btn bg-maroon">保存</button>
            <button type="button" class="btn bg-default" onclick="history.back(-1);">返回</button>
        </div>
    </section>
</div>
</body>

<script src="${ctx}/plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="${ctx}/plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<link rel="stylesheet" href="${ctx}/css/style.css">
<script>
  $('#datepicker').datepicker({
    autoclose: true,
    format: 'yyyy-mm-dd'
  });
  $('#datepicker1').datepicker({
    autoclose: true,
    format: 'yyyy-mm-dd'
  });
</script>
</html>